package com.briup.test;

import java.util.function.Function;

/**
 * @Auther: hjy(lc))
 * @Date: 2022/10/5-10-05-11:08
 * @Description：com.briup.test
 */
public class Lambada_use {
    public static void main(String[] args) {

        Function<String, Integer> fun = (s)-> Integer.parseInt(s);           //字符串转成整形
//        System.out.println(tranform("102",fun));

        String str = "21";
        System.out.println(Long.parseLong(str));

        System.out.println(((Function<String, Integer>) s -> Integer.parseInt(s)).apply("232") );
    }

    public static Integer tranform(String str, Function<String, Integer> fun){
        return fun.apply(str);
    }
}

